from wcs.libs.players import *
from wcs.libs.items import *

itemName = "Tome of Xp"
item = items.addItem(itemName)
item.setCost(5000)
item.setDescription("Purchase a small boost of additional experience")
item.setGroup("special")
item.appendToUser = False

def wcs_item_bought(event_var):
    if event_var["item"] == itemName:
        userid = event_var["userid"]
        player = players[userid]
        currentRace = player.currentRace
        player[currentRace].addXP(100, "purchasing a tomb of Xp")